package pl.un4giv3n.mightvsmagic.utils.display;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.displaytag.decorator.TableDecorator;

import pl.un4giv3n.mightvsmagic.entity.FightReport;

public class DisplayFightDecorator extends TableDecorator {

	private static SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
	
	public String getFightTime(){
		FightReport report = (FightReport) getCurrentRowObject();
		return sdf.format(new Date(report.getFightTime())) + (report.isDefenderSeen()? "":"(nowe)");
	}
}
